﻿{include file="Public/head" title="我要提盈-股票配资" keywords="股票配资" description="股票配资" /}
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
		<!-- 菜单容器 -->
			{include file="Public/header"}
			
			<div class="mui-inner-wrap">
				<div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
					<div class="mui-scroll">
						<header class="tx_head">
							<p>
								<a href="javascript:history.go(-1)" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
								<h5>我要提盈</h5>
								<a id="offCanvasBtn" href="#offCanvasSide" class="mui-icon mui-action-menu mui-icon-bars mui-pull-right" style="color:#fff;"></a>
							</p>
						</header>
		
						<main class="wyty_main">
							<section class="wyty_section1">
								<button class="wyty_section1_b1">我要提盈</button><button class="wyty_section1_b2">提盈记录</button>
							</section>
							<section class="wyty_section2">
								<ul class="mui-table-view">
									<li>股票账户余额　<a href="#" style="margin-left: 25px;">自行查看是否符合提盈条件</a></li>
									<li> 股票账户
									{empty name="hs"}
										<a href="#" style="margin-left: 64px;">暂无股票账户</a>
									{else /}
										<select name="Hsname" id="Hsname" style="border: 1px solid rgba(0,0,0,.2)!important;width: 59%;margin-left: 62px;">
	                                        <option value="">请选择账户</option>
	                                    {volist name="hs" id="v"}
	                                        <option value="{$v['hsUsers']}">{$v['hsUsers']}</option>
                                 		{/volist}
                                		</select>
									{/empty}
															       
									</li>
									<li>提盈金额 <span style="margin-right: -16px;"><input style="width: 80%" id="money" name="money" type="number" placeholder="请正确填写提盈余额">元</span></li>
								</ul>
								<button id="alertBtm2" style="height: 50px;line-height: 35px;">提交</button>
								<div style="padding:14px 2px;">温馨提示： </div>
								<div style="line-height:24px;font-size:14px;color:#555;margin:0px 10px;">
									您的单个账户符合以下条件时，按月配资有权按10000元的整数倍申请提取盈利，老财牛在下个交易日将您的提盈转到您的老财牛账户，账户总资产超过初始申请资金110%且有现金的，可以每天提盈一次。<br>
									例如：10万元领投本金申请50万元跟投资金的该合同，总资产60万元<br>
									提盈:600000x110%=660000之上部分可以提取，当账户总资产达到67万时可以提取1万元盈利，小于110%部分，即660000里60000的部分可以缴纳利息。（按天配资不受该110%提盈标准限制），当天的提盈截止时间15:00，盈利金额以当天收盘后的资产净值为准。<br>
								</div>
							</section>
							
							<section class="wyty_section3">
                                <table>
								    <tr>
								        <td>金额</td>
								        <td>状态</td>
								        <td>时间</td>
								    </tr>
									{empty name="result"}
								        <tr><td>暂无数据......</td></tr>					
									{else /}
										{volist name="result" id='v'}
								            <tr style="font-size: 0.85rem;line-height: 2rem;">
								                <td>{$v['money']}元</td>
								                <td>
								                    {if condition="$v['state'] eq 1"}
									                    提盈成功
									                    {elseif condition="$v['state'] eq 2" /}
									                    <span style="color: red;">提盈失败</span>
									                    {elseif condition="$v['state'] eq 0" /}
									                    审核中
									                {/if}
							                    </td>
								                <td>{$v['dates']|date='Y-m-d H:i:s',###}</td>
								            </tr>
							            {/volist}
									{/empty}
							
							
								</table>
								<!-- 分页 (调取通用方法)-->
								{:pagination($result)}
							</section>

                            
                            <br>
                            <br>
                            <br>
                            <br>
                        </main>
                    </div>
                </div>
				<div class="mui-off-canvas-backdrop"></div>
			</div>
		</div>
		{include file="Public/footer"}
	</body>
<script>

	$("#alertBtm2").click(function(){
		var Hsname = $("#Hsname").val();
		var money = $("#money").val();
		if(Hsname == ''){
			layer.msg('请选择账户', {icon: 5, time: 1000});
			return false;
		}
		if(money == ''){
			layer.msg('请填写金额', {icon: 5, time: 1000});
			return false;
		}
		$.ajax({
            type: "post",
            url:'{:url("addTiying")}',
            data:{'Hsname':Hsname,'money':money},
            dataType: 'JSON',
            success: function(result){
                if(result.success==1){
                	layer.msg(result.msg, {icon: 6, time: 1000}, function(){
                		window.location.reload();//页面刷新
                	});


                }else{
                    layer.msg(result.msg, {icon: 5, time: 2000}, function(){
                		window.location.reload();//页面刷新
                	});

                }
            },
            erroor: function(result){
                layer.msg(result.msg, {icon: 5, time: 2000}, function(){
            		window.location.reload();//页面刷新
            	});

            }
        });
	});
</script>
</html>